Optimal. Leaf size=204 \[ -\frac {x \left (-35 x^2 (d+4 f)+59 d+380 f\right )}{3456 \left (x^4-5 x^2+4\right )}+\frac {x \left (-\left (x^2 (5 d+8 f)\right )+17 d+20 f\right )}{144 \left (x^4-5 x^2+4\right )^2}-\frac {(313 d+820 f) \tanh ^{-1}\left (\frac {x}{2}\right )}{20736}+\frac {1}{648} (13 d+25 f) \tanh ^{-1}(x)-\frac {1}{162} (2 e+5 g) \log \left (1-x^2\right )+\frac {1}{162} (2 e+5 g) \log \left (4-x^2\right )-\frac {\left (5-2 x^2\right ) (2 e+5 g)}{108 \left (x^4-5 x^2+4\right )}+\frac {-\left (x^2 (2 e+5 g)\right )+5 e+8 g}{36 \left (x^4-5 x^2+4\right )^2} \]
________________________________________________________________________________________
Rubi [A] time = 0.25, antiderivative size = 204, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 9, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.321, Rules used = {1673, 1178, 1166, 207, 1247, 638, 614, 616, 31} \begin {gather*} -\frac {x \left (-35 x^2 (d+4 f)+59 d+380 f\right )}{3456 \left (x^4-5 x^2+4\right )}+\frac {x \left (x^2 (-(5 d+8 f))+17 d+20 f\right )}{144 \left (x^4-5 x^2+4\right )^2}-\frac {(313 d+820 f) \tanh ^{-1}\left (\frac {x}{2}\right )}{20736}+\frac {1}{648} (13 d+25 f) \tanh ^{-1}(x)-\frac {\left (5-2 x^2\right ) (2 e+5 g)}{108 \left (x^4-5 x^2+4\right )}+\frac {x^2 (-(2 e+5 g))+5 e+8 g}{36 \left (x^4-5 x^2+4\right )^2}-\frac {1}{162} (2 e+5 g) \log \left (1-x^2\right )+\frac {1}{162} (2 e+5 g) \log \left (4-x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 207
Rule 614
Rule 616
Rule 638
Rule 1166
Rule 1178
Rule 1247
Rule 1673
Rubi steps
\begin {align*} \int \frac {d+e x+f x^2+g x^3}{\left (4-5 x^2+x^4\right )^3} \, dx &=\int \frac {d+f x^2}{\left (4-5 x^2+x^4\right )^3} \, dx+\int \frac {x \left (e+g x^2\right )}{\left (4-5 x^2+x^4\right )^3} \, dx\\ &=\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{144 \left (4-5 x^2+x^4\right )^2}-\frac {1}{144} \int \frac {-19 d+20 f+5 (5 d+8 f) x^2}{\left (4-5 x^2+x^4\right )^2} \, dx+\frac {1}{2} \operatorname {Subst}\left (\int \frac {e+g x}{\left (4-5 x+x^2\right )^3} \, dx,x,x^2\right )\\ &=\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{144 \left (4-5 x^2+x^4\right )^2}+\frac {5 e+8 g-(2 e+5 g) x^2}{36 \left (4-5 x^2+x^4\right )^2}-\frac {x \left (59 d+380 f-35 (d+4 f) x^2\right )}{3456 \left (4-5 x^2+x^4\right )}+\frac {\int \frac {3 (173 d+260 f)+105 (d+4 f) x^2}{4-5 x^2+x^4} \, dx}{10368}+\frac {1}{12} (-2 e-5 g) \operatorname {Subst}\left (\int \frac {1}{\left (4-5 x+x^2\right )^2} \, dx,x,x^2\right )\\ &=\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{144 \left (4-5 x^2+x^4\right )^2}+\frac {5 e+8 g-(2 e+5 g) x^2}{36 \left (4-5 x^2+x^4\right )^2}-\frac {(2 e+5 g) \left (5-2 x^2\right )}{108 \left (4-5 x^2+x^4\right )}-\frac {x \left (59 d+380 f-35 (d+4 f) x^2\right )}{3456 \left (4-5 x^2+x^4\right )}+\frac {1}{648} (-13 d-25 f) \int \frac {1}{-1+x^2} \, dx+\frac {(313 d+820 f) \int \frac {1}{-4+x^2} \, dx}{10368}+\frac {1}{54} (2 e+5 g) \operatorname {Subst}\left (\int \frac {1}{4-5 x+x^2} \, dx,x,x^2\right )\\ &=\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{144 \left (4-5 x^2+x^4\right )^2}+\frac {5 e+8 g-(2 e+5 g) x^2}{36 \left (4-5 x^2+x^4\right )^2}-\frac {(2 e+5 g) \left (5-2 x^2\right )}{108 \left (4-5 x^2+x^4\right )}-\frac {x \left (59 d+380 f-35 (d+4 f) x^2\right )}{3456 \left (4-5 x^2+x^4\right )}-\frac {(313 d+820 f) \tanh ^{-1}\left (\frac {x}{2}\right )}{20736}+\frac {1}{648} (13 d+25 f) \tanh ^{-1}(x)+\frac {1}{162} (-2 e-5 g) \operatorname {Subst}\left (\int \frac {1}{-1+x} \, dx,x,x^2\right )+\frac {1}{162} (2 e+5 g) \operatorname {Subst}\left (\int \frac {1}{-4+x} \, dx,x,x^2\right )\\ &=\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{144 \left (4-5 x^2+x^4\right )^2}+\frac {5 e+8 g-(2 e+5 g) x^2}{36 \left (4-5 x^2+x^4\right )^2}-\frac {(2 e+5 g) \left (5-2 x^2\right )}{108 \left (4-5 x^2+x^4\right )}-\frac {x \left (59 d+380 f-35 (d+4 f) x^2\right )}{3456 \left (4-5 x^2+x^4\right )}-\frac {(313 d+820 f) \tanh ^{-1}\left (\frac {x}{2}\right )}{20736}+\frac {1}{648} (13 d+25 f) \tanh ^{-1}(x)-\frac {1}{162} (2 e+5 g) \log \left (1-x^2\right )+\frac {1}{162} (2 e+5 g) \log \left (4-x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 193, normalized size = 0.95 \begin {gather*} \frac {\frac {12 \left (d x \left (35 x^2-59\right )+64 e \left (2 x^2-5\right )+20 f x \left (7 x^2-19\right )+160 g \left (2 x^2-5\right )\right )}{x^4-5 x^2+4}+\frac {288 \left (-5 d x^3+17 d x+e \left (20-8 x^2\right )-8 f x^3+20 f x-4 g \left (5 x^2-8\right )\right )}{\left (x^4-5 x^2+4\right )^2}-32 \log (1-x) (13 d+16 e+25 f+40 g)+\log (2-x) (313 d+512 e+820 f+1280 g)+32 \log (x+1) (13 d-16 e+25 f-40 g)+\log (x+2) (-313 d+512 e-820 f+1280 g)}{41472} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {d+e x+f x^2+g x^3}{\left (4-5 x^2+x^4\right )^3} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 2.61, size = 470, normalized size = 2.30 \begin {gather*} \frac {420 \, {\left (d + 4 \, f\right )} x^{7} + 768 \, {\left (2 \, e + 5 \, g\right )} x^{6} - 216 \, {\left (13 \, d + 60 \, f\right )} x^{5} - 5760 \, {\left (2 \, e + 5 \, g\right )} x^{4} + 756 \, {\left (5 \, d + 36 \, f\right )} x^{3} + 11520 \, {\left (2 \, e + 5 \, g\right )} x^{2} + 48 \, {\left (43 \, d - 260 \, f\right )} x - {\left ({\left (313 \, d - 512 \, e + 820 \, f - 1280 \, g\right )} x^{8} - 10 \, {\left (313 \, d - 512 \, e + 820 \, f - 1280 \, g\right )} x^{6} + 33 \, {\left (313 \, d - 512 \, e + 820 \, f - 1280 \, g\right )} x^{4} - 40 \, {\left (313 \, d - 512 \, e + 820 \, f - 1280 \, g\right )} x^{2} + 5008 \, d - 8192 \, e + 13120 \, f - 20480 \, g\right )} \log \left (x + 2\right ) + 32 \, {\left ({\left (13 \, d - 16 \, e + 25 \, f - 40 \, g\right )} x^{8} - 10 \, {\left (13 \, d - 16 \, e + 25 \, f - 40 \, g\right )} x^{6} + 33 \, {\left (13 \, d - 16 \, e + 25 \, f - 40 \, g\right )} x^{4} - 40 \, {\left (13 \, d - 16 \, e + 25 \, f - 40 \, g\right )} x^{2} + 208 \, d - 256 \, e + 400 \, f - 640 \, g\right )} \log \left (x + 1\right ) - 32 \, {\left ({\left (13 \, d + 16 \, e + 25 \, f + 40 \, g\right )} x^{8} - 10 \, {\left (13 \, d + 16 \, e + 25 \, f + 40 \, g\right )} x^{6} + 33 \, {\left (13 \, d + 16 \, e + 25 \, f + 40 \, g\right )} x^{4} - 40 \, {\left (13 \, d + 16 \, e + 25 \, f + 40 \, g\right )} x^{2} + 208 \, d + 256 \, e + 400 \, f + 640 \, g\right )} \log \left (x - 1\right ) + {\left ({\left (313 \, d + 512 \, e + 820 \, f + 1280 \, g\right )} x^{8} - 10 \, {\left (313 \, d + 512 \, e + 820 \, f + 1280 \, g\right )} x^{6} + 33 \, {\left (313 \, d + 512 \, e + 820 \, f + 1280 \, g\right )} x^{4} - 40 \, {\left (313 \, d + 512 \, e + 820 \, f + 1280 \, g\right )} x^{2} + 5008 \, d + 8192 \, e + 13120 \, f + 20480 \, g\right )} \log \left (x - 2\right ) - 9600 \, e - 29184 \, g}{41472 \, {\left (x^{8} - 10 \, x^{6} + 33 \, x^{4} - 40 \, x^{2} + 16\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.39, size = 190, normalized size = 0.93 \begin {gather*} -\frac {1}{41472} \, {\left (313 \, d + 820 \, f - 1280 \, g - 512 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac {1}{1296} \, {\left (13 \, d + 25 \, f - 40 \, g - 16 \, e\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{1296} \, {\left (13 \, d + 25 \, f + 40 \, g + 16 \, e\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{41472} \, {\left (313 \, d + 820 \, f + 1280 \, g + 512 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) + \frac {35 \, d x^{7} + 140 \, f x^{7} + 320 \, g x^{6} + 128 \, x^{6} e - 234 \, d x^{5} - 1080 \, f x^{5} - 2400 \, g x^{4} - 960 \, x^{4} e + 315 \, d x^{3} + 2268 \, f x^{3} + 4800 \, g x^{2} + 1920 \, x^{2} e + 172 \, d x - 1040 \, f x - 2432 \, g - 800 \, e}{3456 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 370, normalized size = 1.81 \begin {gather*} -\frac {5 g \ln \left (x -1\right )}{162}+\frac {5 g \ln \left (x +2\right )}{162}+\frac {5 g \ln \left (x -2\right )}{162}-\frac {5 g \ln \left (x +1\right )}{162}-\frac {313 d \ln \left (x +2\right )}{41472}+\frac {e \ln \left (x +2\right )}{81}-\frac {e \ln \left (x -1\right )}{81}-\frac {13 d \ln \left (x -1\right )}{1296}-\frac {e \ln \left (x +1\right )}{81}+\frac {13 d \ln \left (x +1\right )}{1296}+\frac {313 d \ln \left (x -2\right )}{41472}+\frac {e \ln \left (x -2\right )}{81}+\frac {205 f \ln \left (x -2\right )}{10368}+\frac {25 f \ln \left (x +1\right )}{1296}-\frac {25 f \ln \left (x -1\right )}{1296}-\frac {205 f \ln \left (x +2\right )}{10368}+\frac {e}{144 x -144}+\frac {d}{432 x +432}+\frac {d}{432 x -432}-\frac {g}{432 \left (x +2\right )^{2}}+\frac {g}{432 \left (x -1\right )^{2}}+\frac {g}{432 \left (x +1\right )^{2}}-\frac {g}{432 \left (x -2\right )^{2}}-\frac {d}{432 \left (x +1\right )^{2}}+\frac {e}{432 \left (x +1\right )^{2}}+\frac {d}{432 \left (x -1\right )^{2}}+\frac {e}{432 \left (x -1\right )^{2}}+\frac {d}{3456 \left (x +2\right )^{2}}-\frac {e}{1728 \left (x +2\right )^{2}}+\frac {f}{864 \left (x +2\right )^{2}}+\frac {f}{432 \left (x -1\right )^{2}}-\frac {f}{432 \left (x +1\right )^{2}}-\frac {f}{864 \left (x -2\right )^{2}}-\frac {d}{3456 \left (x -2\right )^{2}}-\frac {e}{1728 \left (x -2\right )^{2}}-\frac {13 g}{864 \left (x +2\right )}-\frac {7 g}{432 \left (x +1\right )}+\frac {7 g}{432 \left (x -1\right )}+\frac {13 g}{864 \left (x -2\right )}+\frac {19 d}{6912 \left (x +2\right )}-\frac {17 e}{3456 \left (x +2\right )}+\frac {19 d}{6912 \left (x -2\right )}+\frac {17 e}{3456 \left (x -2\right )}-\frac {e}{144 \left (x +1\right )}+\frac {5 f}{432 \left (x -1\right )}+\frac {5 f}{576 \left (x +2\right )}+\frac {5 f}{576 \left (x -2\right )}+\frac {5 f}{432 \left (x +1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.08, size = 188, normalized size = 0.92 \begin {gather*} -\frac {1}{41472} \, {\left (313 \, d - 512 \, e + 820 \, f - 1280 \, g\right )} \log \left (x + 2\right ) + \frac {1}{1296} \, {\left (13 \, d - 16 \, e + 25 \, f - 40 \, g\right )} \log \left (x + 1\right ) - \frac {1}{1296} \, {\left (13 \, d + 16 \, e + 25 \, f + 40 \, g\right )} \log \left (x - 1\right ) + \frac {1}{41472} \, {\left (313 \, d + 512 \, e + 820 \, f + 1280 \, g\right )} \log \left (x - 2\right ) + \frac {35 \, {\left (d + 4 \, f\right )} x^{7} + 64 \, {\left (2 \, e + 5 \, g\right )} x^{6} - 18 \, {\left (13 \, d + 60 \, f\right )} x^{5} - 480 \, {\left (2 \, e + 5 \, g\right )} x^{4} + 63 \, {\left (5 \, d + 36 \, f\right )} x^{3} + 960 \, {\left (2 \, e + 5 \, g\right )} x^{2} + 4 \, {\left (43 \, d - 260 \, f\right )} x - 800 \, e - 2432 \, g}{3456 \, {\left (x^{8} - 10 \, x^{6} + 33 \, x^{4} - 40 \, x^{2} + 16\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.85, size = 182, normalized size = 0.89 \begin {gather*} \frac {\left (\frac {35\,d}{3456}+\frac {35\,f}{864}\right )\,x^7+\left (\frac {e}{27}+\frac {5\,g}{54}\right )\,x^6+\left (-\frac {13\,d}{192}-\frac {5\,f}{16}\right )\,x^5+\left (-\frac {5\,e}{18}-\frac {25\,g}{36}\right )\,x^4+\left (\frac {35\,d}{384}+\frac {21\,f}{32}\right )\,x^3+\left (\frac {5\,e}{9}+\frac {25\,g}{18}\right )\,x^2+\left (\frac {43\,d}{864}-\frac {65\,f}{216}\right )\,x-\frac {25\,e}{108}-\frac {19\,g}{27}}{x^8-10\,x^6+33\,x^4-40\,x^2+16}-\ln \left (x-1\right )\,\left (\frac {13\,d}{1296}+\frac {e}{81}+\frac {25\,f}{1296}+\frac {5\,g}{162}\right )+\ln \left (x+1\right )\,\left (\frac {13\,d}{1296}-\frac {e}{81}+\frac {25\,f}{1296}-\frac {5\,g}{162}\right )+\ln \left (x-2\right )\,\left (\frac {313\,d}{41472}+\frac {e}{81}+\frac {205\,f}{10368}+\frac {5\,g}{162}\right )-\ln \left (x+2\right )\,\left (\frac {313\,d}{41472}-\frac {e}{81}+\frac {205\,f}{10368}-\frac {5\,g}{162}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________